package com.atguigu.bigdata.spark.core.rdd.builder;

import org.apache.spark.SparkConf;
import org.apache.spark.api.java.JavaRDD;
import org.apache.spark.api.java.JavaSparkContext;

public class Spark02_RDD_File_Par_JAVA {
    public static void main(String[] args) {
        // TODO 准备环境
        SparkConf conf = new SparkConf().setMaster("local[*]").setAppName("sparkCore");
        JavaSparkContext sc = new JavaSparkContext(conf);

        // TODO 创建RDD
        JavaRDD<String> rdd = sc.textFile("datas/*.txt");

        rdd.saveAsTextFile("output");

        sc.close();
    }
}
